﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class YoozooGameplayRTSInnerCitySpriteHelperWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(Yoozoo.Gameplay.RTS.InnerCitySpriteHelper);
			Utils.BeginObjectRegister(type, L, translator, 0, 9, 0, 0);
			
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetDirectionIndex", _m_GetDirectionIndex);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetDirectionIndex16Direct", _m_GetDirectionIndex16Direct);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetMaterial", _m_GetMaterial);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "LoadMat", _m_LoadMat);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetBillBoardRotation", _m_GetBillBoardRotation);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "CreateSprite", _m_CreateSprite);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "RecoverSprite", _m_RecoverSprite);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "Dispose", _m_Dispose);
			
			
			
			
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 5, 1, 1);
			
			
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "LEFT_DOWN", Yoozoo.Gameplay.RTS.InnerCitySpriteHelper.LEFT_DOWN);
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "RIGHT_DOWN", Yoozoo.Gameplay.RTS.InnerCitySpriteHelper.RIGHT_DOWN);
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "LEFT_UP", Yoozoo.Gameplay.RTS.InnerCitySpriteHelper.LEFT_UP);
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "RIGHT_UP", Yoozoo.Gameplay.RTS.InnerCitySpriteHelper.RIGHT_UP);
            
			Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "COS_THRESHOLD", _g_get_COS_THRESHOLD);
            
			Utils.RegisterFunc(L, Utils.CLS_SETTER_IDX, "COS_THRESHOLD", _s_set_COS_THRESHOLD);
            
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 1)
				{
					
					var gen_ret = new Yoozoo.Gameplay.RTS.InnerCitySpriteHelper();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Gameplay.RTS.InnerCitySpriteHelper constructor!");
            
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 0)
				{
					
					var gen_ret = new Yoozoo.Gameplay.RTS.InnerCitySpriteHelper();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Gameplay.RTS.InnerCitySpriteHelper constructor!");
            
        }

        
		
        
		
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetDirectionIndex(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Gameplay.RTS.InnerCitySpriteHelper gen_to_be_invoked = (Yoozoo.Gameplay.RTS.InnerCitySpriteHelper)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    UnityEngine.Vector3 _moveVector;translator.Get(L, 2, out _moveVector);
                    
                        var gen_ret = gen_to_be_invoked.GetDirectionIndex( _moveVector );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetDirectionIndex16Direct(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Gameplay.RTS.InnerCitySpriteHelper gen_to_be_invoked = (Yoozoo.Gameplay.RTS.InnerCitySpriteHelper)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    UnityEngine.Vector3 _moveVector;translator.Get(L, 2, out _moveVector);
                    
                        var gen_ret = gen_to_be_invoked.GetDirectionIndex16Direct( _moveVector );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetMaterial(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Gameplay.RTS.InnerCitySpriteHelper gen_to_be_invoked = (Yoozoo.Gameplay.RTS.InnerCitySpriteHelper)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    string _altasName = LuaAPI.lua_tostring(L, 2);
                    
                        var gen_ret = gen_to_be_invoked.GetMaterial( _altasName );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_LoadMat(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Gameplay.RTS.InnerCitySpriteHelper gen_to_be_invoked = (Yoozoo.Gameplay.RTS.InnerCitySpriteHelper)translator.FastGetCSObj(L, 1);
            
            
			    int gen_param_count = LuaAPI.lua_gettop(L);
            
                if(gen_param_count == 2&& translator.Assignable<System.Action>(L, 2)) 
                {
                    System.Action _action = translator.GetDelegate<System.Action>(L, 2);
                    
                    gen_to_be_invoked.LoadMat( _action );
                    
                    
                    
                    return 0;
                }
                if(gen_param_count == 1) 
                {
                    
                    gen_to_be_invoked.LoadMat(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
            return LuaAPI.luaL_error(L, "invalid arguments to Yoozoo.Gameplay.RTS.InnerCitySpriteHelper.LoadMat!");
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetBillBoardRotation(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Gameplay.RTS.InnerCitySpriteHelper gen_to_be_invoked = (Yoozoo.Gameplay.RTS.InnerCitySpriteHelper)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                        var gen_ret = gen_to_be_invoked.GetBillBoardRotation(  );
                        translator.PushUnityEngineVector3(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_Init(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Gameplay.RTS.InnerCitySpriteHelper gen_to_be_invoked = (Yoozoo.Gameplay.RTS.InnerCitySpriteHelper)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    Yoozoo.Mars.Got.SpriteAnim.SpriteParticleSystemManager _spriteParticleSystemManager = (Yoozoo.Mars.Got.SpriteAnim.SpriteParticleSystemManager)translator.GetObject(L, 2, typeof(Yoozoo.Mars.Got.SpriteAnim.SpriteParticleSystemManager));
                    
                    gen_to_be_invoked.Init( _spriteParticleSystemManager );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_CreateSprite(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Gameplay.RTS.InnerCitySpriteHelper gen_to_be_invoked = (Yoozoo.Gameplay.RTS.InnerCitySpriteHelper)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    string _soldierName = LuaAPI.lua_tostring(L, 2);
                    UnityEngine.Vector3 _position;translator.Get(L, 3, out _position);
                    Yoozoo.Mars.Got.SpriteAnim.AnimSpriteCreator _creator = (Yoozoo.Mars.Got.SpriteAnim.AnimSpriteCreator)translator.GetObject(L, 4, typeof(Yoozoo.Mars.Got.SpriteAnim.AnimSpriteCreator));
                    
                        var gen_ret = gen_to_be_invoked.CreateSprite( _soldierName, _position, _creator );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_RecoverSprite(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Gameplay.RTS.InnerCitySpriteHelper gen_to_be_invoked = (Yoozoo.Gameplay.RTS.InnerCitySpriteHelper)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    Yoozoo.Mars.Got.SpriteAnim.AnimSprite _sprite = (Yoozoo.Mars.Got.SpriteAnim.AnimSprite)translator.GetObject(L, 2, typeof(Yoozoo.Mars.Got.SpriteAnim.AnimSprite));
                    
                    gen_to_be_invoked.RecoverSprite( _sprite );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_Dispose(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                Yoozoo.Gameplay.RTS.InnerCitySpriteHelper gen_to_be_invoked = (Yoozoo.Gameplay.RTS.InnerCitySpriteHelper)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                    gen_to_be_invoked.Dispose(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_COS_THRESHOLD(RealStatePtr L)
        {
		    try {
            
			    LuaAPI.lua_pushnumber(L, Yoozoo.Gameplay.RTS.InnerCitySpriteHelper.COS_THRESHOLD);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_COS_THRESHOLD(RealStatePtr L)
        {
		    try {
                
			    Yoozoo.Gameplay.RTS.InnerCitySpriteHelper.COS_THRESHOLD = (float)LuaAPI.lua_tonumber(L, 1);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
		
		
		
		
    }
}
